<?php
	$folder = $_POST['email_type'];
	if($handle = opendir("../data/$folder")){
		while (false !== ($entry = readdir($handle))) {
			if($entry != "." && $entry != ".."){
				echo "<option value=\"$entry\">$entry</option>";
			}
		}
	}else{
		echo "<script>alert(\"An error has occured.  Please contact your Administrator.\");</script>";
	}

?>